package com.bestv.search.common.service;

import com.bestv.search.common.dataSource.DataSourceKey;
import com.bestv.search.common.model.AccessLog;

import java.util.Date;
import java.util.List;

/**
 * @author Justin Luo
 */
public interface AccessLogManager {

    void saveAccessLog(DataSourceKey key, AccessLog log);

    void updateAccessLog(DataSourceKey key, AccessLog log);

    AccessLog getAccessLog(DataSourceKey key, int type, Date accessLowerTime, String siteCode, int serverNo);

    List<AccessLog> getAccessLog(DataSourceKey key, Date accessLowerTime, Date accessUpperTime);

    List<AccessLog> getAccessLog(DataSourceKey key, Date accessLowerTime, Date accessUpperTime, int[] types,
                                 int serverNo);

    List<AccessLog> getAccessLogByMonth(DataSourceKey key, Date startMonth, Date endMonth, int[] types);

    void saveOrUpdateAccessLog(DataSourceKey key, List<AccessLog> log);

    List<AccessLog> getByDate(DataSourceKey key, Date startDate, Date endDate, int[] types);

}